import service, { get, post, put, del } from '@/utils/request'

// 获取用户菜单
export function getUserMenu() {
  return get('/system/permission/user/menu')
}

// 获取权限树
export function getPermissionTree() {
  return get('/system/permission/tree')
}

// 获取权限列表
export function listPermissions() {
  return get('/system/permission/list')
}

// 获取权限详情
export function getPermission(id) {
  return get(`/system/permission/${id}`)
}

// 添加权限
export function addPermission(data) {
  return post('/system/permission', data)
}

// 更新权限
export function updatePermission(data) {
  return put('/system/permission', data)
}

// 删除权限
export function deletePermission(id) {
  return del(`/system/permission/${id}`)
} 